package uk.co.nazz.f21mc_a2;

import uk.co.nazz.f21mc_a2.diary.Diary;
import android.app.Application;
import android.util.Log;

public class DiaryApplication extends Application {
	

	
	final static String CAL_NAME = "F21MC_2";
	private Diary diary;
	
	// If the diary exists connect to it if not create it
	@Override
	public void onCreate() {
		super.onCreate();
		diary = new Diary(this, CAL_NAME);
		Log.i("F21MC_2", "Started");
	}

	@Override
	public void onTerminate() {
		super.onTerminate();
		Log.i("F21MC_2", "Terminated");
	}
	
	public Diary getDiary(){
		return diary;
	}

	
}
